package com.example.demo.listener;

import org.springframework.context.ApplicationEvent;

/**
 *
 * 定义事件
 * 还需要定义一个监听器
 *
 */
public class MyEvent extends ApplicationEvent{

    private String clientId;

    private String param;

    public MyEvent(Object source) {
        //定义成Object类
        super(source);
    }


    public MyEvent(String clientId,String param) {
        super(clientId);
        this.clientId = clientId;
        this.param = param;
    }

    public String getParam() {
        return param;
    }

    public String getClientId() {
        return clientId;
    }
}